Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy 0.15 #35

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Bevy 0.15 #35

wants to merge 18 commits into from

Conversation

ptsd
Copy link
Contributor

@ptsd ptsd commented Nov 6, 2024

Hi there,

First of all thanks for an awesome package 👍

I'm working on a project and in the middle of preparing for bevy 0.15 and thought I might as well share my in-progress work.

bevy_rapier has no 0.15 support yet so that's still outstanding. I have my own fork of bevy_rapier and rapier that works but best to wait for the upstream changes. The nalgebra stuff for glam29 got merged so presumably not too far away 😄

Also fixed a few issues with Rectangle vs Plane3d and rotation and added a multi floor example for avian.

There are some CI changes I found useful for my own testing I've added as well, feel free to ignore them 🤷

Main changes:

  • Update bevy deps to 0.15
  • Update parry3d dep to 0.17 as both avian3d and rapier3d will be on 0.17 for bevy-0.15
  • Remove the parry3d feature matrix stuff
  • Update avian3d dep to git/main for now
  • Update nalgebra dep to 0.33 for the convert-glam029 feature support
  • Update parry3d example / tests as required
  • Update avian3d example / tests as required
  • Update parry3d workflow for changed features
  • Couple of spelling / wording changes
  • Update bevy_rapier3d dep
  • Update rapier3d example / tests as required

Other changes:

  • Add test_benches to CI (Ensures benches at least compile/run for commit)
  • Add run_benches to CI with manual trigger
  • Move CI tests to nextest with junit reporting
  • Tweak CI run conditions to avoid double test runs for pushes to branches in PR
  • Update CI runs for separate run / report workflows as per discussion below (see Add test reporting (prep for 0.15 changes) #36)
  • Add multi floor example for Avian
  • Add bevy_window to dev bevy features
  • Update MIGRATING.md for 0.12.0
  • Update README.md for 0.12.0

TODO:

  • Remove crates-io patch for bevy_rapier3d when upstream updates
  • Remove crates-io patch for avian3d when upstream updates

@ptsd ptsd marked this pull request as draft November 6, 2024 21:49
@TheGrimsey
Copy link
Owner

TheGrimsey commented Nov 7, 2024

Fantastic!

Huge props for actually fixing the issues with the examples. I should've done that a while ago 😅

Very interested in seeing those CI changes 👀

@ptsd
Copy link
Contributor Author

ptsd commented Nov 12, 2024

👍
Looks like it's the test reporting thats failing. Are you using a scoped token / PAT for your action runs maybe?

mikepenz/action-junit-report#23

Was also wondering if it would be better splitting the backends into seperate cargo.toml only style crates ala bevy_mod_picking / rapier? Happy to do that as part of this if you think it's worthwhile?

@ptsd ptsd mentioned this pull request Nov 12, 2024
@TheGrimsey
Copy link
Owner

TheGrimsey commented Nov 12, 2024

Are you using a scoped token / PAT for your action runs maybe?

I have none set at all 🤔

Ah, need to set permissions in the workflow for PRs checks to function.

Was also wondering if it would be better splitting the backends into seperate cargo.toml only style crates ala bevy_mod_picking / rapier? Happy to do that as part of this if you think it's worthwhile?

Is that possible with the trait? Isn't blocked by the orphan rule?

@ptsd
Copy link
Contributor Author

ptsd commented Nov 16, 2024

Ah, need to set permissions in the workflow for PRs checks to function.

👍

Is that possible with the trait? Isn't blocked by the orphan rule?

Yeah noticed that after playing with splitting it out 🤷‍♂️

ptsd added 7 commits November 25, 2024 18:18
- Update bevy deps to latest rc
- Update parry3d dep to 0.17 as both avian3d and rapier3d will be on 0.17 for bevy-0.15
- Remove the parry3d feature matrix stuff
- Update avian3d dep to git/main for now
- Update nalgebra dep to 0.33 for the `convert-glam029` feature support
- Update parry3d example / tests as required
- Update avian3d example / tests as required
- Update parry3d workflow for changed features
- Couple of spelling / wording changes
@ptsd
Copy link
Contributor Author

ptsd commented Nov 25, 2024

@TheGrimsey

So as per above I've split out the test / report test bits of the workflow to allow for posting checks. This is a bit of a rigamarole as it requires merging the dependent PR (#36) before this.

The action token permissions for public fork based PRs are hard read only, so the workflows that actually publish the reports have to pre-exist in the root repository to work around that limitation.

I've also removed the pr comment feature as that requires even more messing around with run contexts to determine the correct PR to post to in the dependent workflows.

These changes do also introduce some small security concerns but the reporting workflows are scoped to only checks: write and you don't allow automatic runs for fork based PRs so this seems fine?

Honestly this feels a bit overboard for the current test setup but presumably the plan is to add more coverage? I have a few tests around my own usage that are relevant but need some tidy-up to be generally applicable.

Also for some reason all the reports show up as triggered by the Test Avian workflow but they end up in the correct place so meh...

Up to you which way you want to proceed 🤷‍♂️. Happy to strip this back to just the actual 0.15 changes if you'd prefer?

@TheGrimsey
Copy link
Owner

These changes do also introduce some small security concerns but the reporting workflows are scoped to only checks: write and you don't allow automatic runs for fork based PRs so this seems fine?

Yeah, runs need approval so it should be fine.

Honestly this feels a bit overboard for the current test setup but presumably the plan is to add more coverage? I have a few tests around my own usage that are relevant but need some tidy-up to be generally applicable.

Yup yup. I need to get writing more tests 😅

I'll go for it. Can always delete it if it does not do well

@Occuros
Copy link

Occuros commented Dec 2, 2024

will this be merged soon as bevy 0.15 just came out?

@ptsd
Copy link
Contributor Author

ptsd commented Dec 3, 2024

will this be merged soon as bevy 0.15 just came out?

Still waiting on upstream changes for now:

  • Remove crates-io patch for bevy_rapier3d when upstream updates
  • Remove crates-io patch for avian3d when upstream updates

If you want to use while we wait I suggest:

Using parry3d:

[dependencies]
oxidized_navigation = { version = "0.12", default_features = false, features = ["parry3d"] }

[patch.crates-io]
oxidized_navigation = { git = "https://github.com/ptsd/oxidized_navigation.git", branch = "bevy-0.15" }

Using avian3d:

[dependencies]
oxidized_navigation = { version = "0.12", default_features = false, features = ["avian"] }
avian3d = { version = "0.1" }

[patch.crates-io]
oxidized_navigation = { git = "https://github.com/ptsd/oxidized_navigation.git", branch = "bevy-0.15" }
avian3d = { git = "https://github.com/Jondolf/avian.git", branch = "main" }

Using rapier3d (note the changes are upstream but no release tag as of yet):

[dependencies]
oxidized_navigation = { version = "0.12", default_features = false, features = ["rapier"] }
bevy_rapier3d = { version = "0.27" }

[patch.crates-io]
oxidized_navigation = { git = "https://github.com/ptsd/oxidized_navigation.git", branch = "bevy-0.15" }
bevy_rapier3d = { git = "https://github.com/Vrixyz/bevy_rapier.git", branch = "master-bevy_0.15" }

Misc: Various fmt / clippy fixes.
@ptsd
Copy link
Contributor Author

ptsd commented Dec 3, 2024

@TheGrimsey

I've reworked the CI stuff to a single matrix based workflow and added lints (fmt / check / clippy).

You can see an example run with a couple of failures @ https://github.com/ptsd/oxidized_navigation/actions/runs/12130725865

Would be good to get the other prep PR merged 👍

Marking as ready for review as we are just awaiting upstream...

@ptsd ptsd marked this pull request as ready for review December 3, 2024 01:29
TheGrimsey pushed a commit that referenced this pull request Dec 3, 2024
Requirement for
#35

See discussion in that PR for details.
@ptsd
Copy link
Contributor Author

ptsd commented Dec 15, 2024

@TheGrimsey

Honestly might be better to just release this as the last thing is avian upstream and anyone wanting to use that backend is going to have to depend on the git version anyway 🤷.

I've updated README.md and MIGRATING.md as appropriate to explain this.

Then come back and remove the override when they update and release a 0.12.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants